home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
updates
/
update24.zoo
/
curses
/
diffs
next >
Wrap
Text File
|
1992-08-14
|
7KB
|
293 lines
*** 1.14 1992/07/21 15:00:13
--- Changelo 1992/08/14 15:39:54
***************
*** 167,169 ****
--- 167,183 ----
mv overwrite.c overwrit.c
mv toucholap.c touchola.c
-------------------------- Patchlevel 14 ---------------------------------
+
+ tgetnum.c, tgetent.c:: scott/jrb
+ pay attention to LINES/COLUMNS in the environment. when making
+ the default entry first look in the env, failing which hit
+ linea0() for li/co. if only one of li or co are in the env,
+ then the other is still gotten from linea0().
+
+ ident: ++jrb
+ ident.c new file with Patchlevel for ident(1)
+
+ mincl: ++jrb
+ add ident.o
+
+ -------------------------- Patchlevel 15 ---------------------------------
*** 1.2 1991/09/24 17:24:27
--- Makefile.mint 1992/08/14 15:39:55
***************
*** 8,14 ****
CROSSINC = $(CROSSDIR)/include
AR = $(CROSSBIN)/car
! CC = cgcc -mint -nostdinc -I/net/acae127/home/bammi/atari/mint/mintlib/include -I.
CPP = /lib/cpp
AS = $(CC)
LIB = $(CROSSLIB)
--- 8,14 ----
CROSSINC = $(CROSSDIR)/include
AR = $(CROSSBIN)/car
! CC = cgcc -mint
CPP = /lib/cpp
AS = $(CC)
LIB = $(CROSSLIB)
*** 1.1 1991/05/04 15:09:33
--- Mmakefile.16 1992/08/14 15:39:55
***************
*** 9,15 ****
MODEL = -mshort
DEFINES = -DDGK -DGEMDOS
! COPTS= -O -fomit-frame-pointer -fcombine-regs -fstrength-reduce \
-DNDEBUG $(DEFINES) $(XFLAGS)
# normal CFLAGS
--- 9,15 ----
MODEL = -mshort
DEFINES = -DDGK -DGEMDOS
! COPTS= -O -fomit-frame-pointer -fstrength-reduce \
-DNDEBUG $(DEFINES) $(XFLAGS)
# normal CFLAGS
*** 1.1 1991/05/04 15:09:33
--- Mmakefile.32 1992/08/14 15:39:56
***************
*** 9,15 ****
MODEL =
DEFINES = -DDGK -DGEMDOS
! COPTS= -O -fomit-frame-pointer -fcombine-regs -fstrength-reduce \
-DNDEBUG $(DEFINES) $(XFLAGS)
# normal CFLAGS
--- 9,15 ----
MODEL =
DEFINES = -DDGK -DGEMDOS
! COPTS= -O -fomit-frame-pointer -fstrength-reduce \
-DNDEBUG $(DEFINES) $(XFLAGS)
# normal CFLAGS
*** 1.12 1992/06/24 15:39:35
--- PatchLev.h 1992/08/14 15:39:56
***************
*** 1,5 ****
/*
- * PathLevel: 14
*
* the Patch Level above is to identify the version
* of the all the files in this directory. given the above
--- 1,7 ----
+
+ #define PatchLevel "15"
+
/*
*
* the Patch Level above is to identify the version
* of the all the files in this directory. given the above
*** 1.3 1992/06/24 15:39:35
--- mincl 1992/08/14 15:40:05
***************
*** 9,15 ****
TERMOBJ = tgetent.o tgetflag.o tgetnum.o tgetstr.o tgoto.o \
tputs.o fgetlr.o
! OTHER = xconsole.o
all: $(ALL)
--- 9,15 ----
TERMOBJ = tgetent.o tgetflag.o tgetnum.o tgetstr.o tgoto.o \
tputs.o fgetlr.o
! OTHER = xconsole.o ident.o
all: $(ALL)
*** 1.6 1992/04/19 16:42:24
--- tgetent.c 1992/08/14 15:40:10
***************
*** 97,102 ****
--- 97,106 ----
# include <compiler.h>
#endif
+ #if __STDC__
+ # include<stdlib.h>
+ #endif
+
#define TRUE 1
#define FALSE 0
#define BUFSIZE 1024 /* Assumed size of external buffer */
***************
*** 492,506 ****
# ifdef GEMDOS
/*
* if we do not have any better information, then
* we will try to glimpse screen sizes from Line-A variables
*/
! linea0();
strcpy (bp, ":co#");
! (void) _ultoa((unsigned long) (V_CEL_MX + 1),
! bp + sizeof(":co#") - 1, 10);
strcat (bp, ":li#");
! (void) _ultoa((unsigned long) (V_CEL_MY + 1),
! bp + strlen(bp), 10);
strcat (bp, term_default);
# endif
return (FILE *) NULL;
--- 496,531 ----
# ifdef GEMDOS
/*
* if we do not have any better information, then
+ * first try to glimpse screen size from the env
+ * failing which
* we will try to glimpse screen sizes from Line-A variables
*/
! char *rows, *cols = getenv("COLUMNS");
!
! if(!(rows = getenv("LINES")))
! rows = getenv("ROWS");
!
! if((!rows) || (!cols))
! linea0();
!
strcpy (bp, ":co#");
! if(!cols)
! {
! (void) _ultoa((unsigned long) (V_CEL_MX + 1),
! bp + sizeof(":co#") - 1, 10);
! }
! else
! strcat(bp, cols);
!
strcat (bp, ":li#");
! if(!rows)
! {
! (void) _ultoa((unsigned long) (V_CEL_MY + 1),
! bp + strlen(bp), 10);
! }
! else
! strcat(bp, rows);
!
strcat (bp, term_default);
# endif
return (FILE *) NULL;
*** 1.3 1991/05/04 18:38:14
--- tgetnum.c 1992/08/14 15:40:10
***************
*** 40,52 ****
*
*/
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <termcap.h>
!
! #ifndef _COMPILER_H
! # include <compiler.h>
#endif
# ifdef MSDOS
--- 40,55 ----
*
*/
+ #ifndef _COMPILER_H
+ # include <compiler.h>
+ #endif
+
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <termcap.h>
! #if __STDC__
! # include <stdlib.h>
#endif
# ifdef MSDOS
***************
*** 82,89 ****
--- 85,121 ----
* Return failure value.
* End tgetnum
*
+ * Atari ST specific change, when this fails, we chech to see if we are
+ * trying to get the entry for "li" = lines, ro "co" = columns, if
+ * this is the case try the environment variables "ROWS" "LINES" and
+ * "COLUMNS", before returning error. This is great for window
+ * managers like "Gemini" or "TOSwin".
+ *
*/
+ #if defined(GEMDOS)
+ /* get line /col from the env */
+ static int getlinecol(id)
+ char *id;
+ {
+ char *p;
+
+ if (id[0] == 'l' && id[1] =='i' )
+ {
+ if(!(p = getenv("LINES")))
+ p = getenv("ROWS");
+ if(p)
+ return(atoi(p));
+ }
+ else if (id[0] == 'c' && id[1] =='o' )
+ {
+ if((p = getenv("COLUMNS")))
+ return(atoi(p));
+ }
+ return(-1);
+ }
+ #endif
+
int tgetnum(id)
char *id;
{
***************
*** 95,101 ****
--- 127,138 ----
bp++;
if (*bp++ == id[0] && *bp != '\0' && *bp++ == id[1]) {
if (*bp != '\0' && *bp++ != '#') {
+ #if !defined(GEMDOS)
return(-1);
+ #else
+ return getlinecol(id);
+ #endif
+
} else {
value = 0;
if (*bp == '0') {
***************
*** 110,115 ****
return(value);
}
}
! }
! return(-1);
}
--- 147,156 ----
return(value);
}
}
! }
! #if !defined(GEMDOS)
! return(-1);
! #else
! return getlinecol(bp);
! #endif
}